package io;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

/**
 * 打印流
 * 
 * @author fusong
 * 
 */
public class TestPrintStream {

	/**
	 * @param args
	 * @throws FileNotFoundException
	 */
	public static void main(String[] args) throws FileNotFoundException {
		PrintStream print = new PrintStream(new FileOutputStream(new File(
				CharStreamWriteFile.filename)));
		String name = "Rollen";
		int age = 20;
		print.printf("姓名：%s. 年龄：%d.", name, age);
		print.close();
	}

}
